set proc to TGPproc
set proc to boxproc
do start
tanggal = date()
dr      = 'N:'
F1      = 'USERCASH'
progr   = 'PWCAS1'
store .f. to exactpw,accpw
STORE SPACE(16) TO USERNM,USNM, USNM2, USNM3
STORE 0 TO PIL,compt,MESC

SET COLOR TO W+/B
clea
SET COLOR TO W+/BG
@ 2,4 CLEA TO 22,75
DO BOXE WITH 6,21,"Enter your Name :",'USNM','W+','B+','GR+','R+',16,.T.,.T.
USNM=ALLTRIM(UPPER(USNM))

REST FROM N:COMCAS2 ADDI
PUBLIC USERNM
IF USNM=USERNM
   SET COLO TO GR+*/BG
   KET=USNM+' ALREADY REGISTERED ON CASHIER 2'
   KOL=(80-LEN(KET))/2
   @ 12,KOL SAY KET
   INKEY(0)
   RETU
ELSE
   REST FROM N:COMCAS3 ADDI
   PUBLIC USERNM
   IF USNM=USERNM
      SET COLO TO GR+*/BG
      KET=USNM+' ALREADY REGISTERED ON CASHIER 3'
      KOL=(80-LEN(KET))/2
      @ 12,KOL SAY KET
      INKEY(0)
      RETU
   ENDI
ENDI
SET COLO TO W+*/BG

USERNM=USNM
USE &DR&F1
SET EXCLU OFF
LOCA FOR STAF_NAME=USERNM
IF EOF()
   RETURN
ENDIF

if staf_pw=space(40)
   do makepw
else
   do chekpw
endif

SET COLOR TO BG/B
if .not. exactpw  .and. .not. accpw
   return
ELSE
   SAVE TO N:COMCAS1 ALL LIKE USERNM
endif
clear
RETURN
